package com.jack.oopTest;

public class Emperor {
    /*
     * 2.封装一个皇帝类，里面有姓名，在位时间，政绩，描述4个属性，
     * 提供一个方法用来显示所有属性，私有化这些属性并提供对应的get以及set方法，
     * 并在测试类中测试。
     */
    private String name;
    private int time;
    private String score;
    private String info;

    @Override
    public String toString() {
        return "Emperor{" +
                "name='" + name + '\'' +
                ", time=" + time +
                ", score='" + score + '\'' +
                ", info='" + info + '\'' +
                '}';
    }

    public Emperor(String name, int time, String score, String info) {
        this.name = name;
        this.time = time;
        this.score = score;
        this.info = info;
    }

    public Emperor() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}
